using System;

namespace XnaInForm
{
    public class PerformanceCounter
    {
        [System.Runtime.InteropServices.DllImport("Kernel32.dll")]
        public static extern bool QueryPerformanceCounter(out long perfcount);

        [System.Runtime.InteropServices.DllImport("Kernel32.dll")]
        public static extern bool QueryPerformanceFrequency(out long freq);

        public static long QueryPerformanceCounter()
        {
            long perfcount;
            QueryPerformanceCounter(out perfcount);
            return perfcount;
        }

        public static long QueryPerformanceFrequency()
        {
            long freq;
            QueryPerformanceFrequency(out freq);
            return freq;
        }
    }
}
